<!DOCTYPE html>
<html>

<body>

    <h2>我的第一段JavaScript</h2>
    <p id="demo">
        快点击下方按钮试试吧！
    </p>
    <script>
        function aaa() {

            x = document.getElementById("demo");//找到内容
            x.innerHTML = "欢迎来到米奇妙妙屋";  //替换内容

        }
    </script>
    <button type="button" onclick="aaa()">点我发财！</button>
    <script src="./index.js"></script>

</body>
</html>